<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title>待审流程管理</title>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp"%>
<%@include file="audit.jsp"%>
<script type="text/javascript">
</script>
</head>
<body>
<div class="x-panel">
<div class="x-panel-header">【报销】财务审核管理</div>
<div class="x-toolbar">
  <table width="99%">
        <tr>
        <s:form action="reimbIndex" theme="simple" id="form1">
	      <td width="60">审核状态：</td>
	      <td width="90"><s:select list='auditStatusMap' name="model.audStatus" cssStyle="width:80px" headerKey="" headerValue="全部"></s:select></td>        
          <td width="200">标题：<s:textfield name="model.title" cssStyle="width:160px;" /></td>
          <td>开始日期：<input id="startDate" name="startDate" size="12"  value='${startDate}' onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}',skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" class="Wdate"  readonly="readonly"/>
        	   结束日期：<input id="endDate" name="endDate" size="12" value='${endDate}' onfocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}',skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" class="Wdate"  readonly="readonly"/>
        	<s:submit value="查询" cssClass="button" cssStyle="width:40px;"></s:submit>
           </td>
        </s:form>
        </tr>
      </table>
</div>
<div class="x-panel-body">
<ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit" 
	    action="reimbIndex.do"
		useAjax="true" doPreload="false"
		maxRowsExported="10000000" 
		pageSizeList="15,50,100" 
		editable="false" 
		sortable="false"	
		rowsDisplayed="15"	
		generateScript="true"	
		resizeColWidth="true"	
		classic="false"	
		width="100%" 	
		height="400px"	
		minHeight="400"
		toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	<ec:row>
	    <ec:column width="30" property="_s" title="No." value="${GLOBALROWCOUNT}" sortable="false" style="text-align:center"/>
		<ec:column width="140" property="_title" title="标题" ellipsis="true">
		<a href="${ctx}/reimb/view.do?model.id=${item.reimb.id}" target="_blank"><font color="blue">${item.title}</font></a>
		</ec:column>
	    <ec:column width="100" property="reimb.dept.name" title="部门" style="text-align:center"/>	
	    <ec:column width="120" property="reimb.project.name" title="所属项目" ellipsis="true"/>			
	    <ec:column width="100" property="reimb.item.name" title="财务科目" ellipsis="true"/>			
	    <ec:column width="65" property="reimb.reimber.name" title="报销人" style="text-align:center"/>	
		<ec:column width="75" property="reimb.createDate" title="报销时间" style="text-align:center" cell="date"/>
		<ec:column width="70" property="reimb.amount" title="报销金额" style="text-align:right" format="#####0.00" cell="number"/>			
		<ec:column width="70" property="_audStatus" title="审核状态" style="text-align:center" mappingItem="auditStatusMap">
		  <s:if test="#attr.item.audStatus == 0"><font color="#999999">待审核</font></s:if>
		  <s:if test="#attr.item.audStatus == 1"><font color="green">已通过</font></s:if>
		  <s:if test="#attr.item.audStatus == 2"><font color="red">未通过</font> </s:if>
		</ec:column>				
		<ec:column width="80" property="_0" title="操作" style="text-align:center" sortable="false">
		    <c:choose>
		      <c:when test="${item.audStatus != '0'}">
			       <font color="#999999">审核</font>	 | 	      	     
		      </c:when>
		      <c:otherwise>
		        <a href="#" onclick="showAuditWindow('${item.id}', 3)">审核</a> | 	  	 
		      </c:otherwise>
		    </c:choose>		   
		    <a href="${ctx}/reimb/view.do?model.id=${item.reimb.id}" target="_blank">查看</a>	
		</ec:column>
	</ec:row>
</ec:table>
</div>
</div>
<script type="text/javascript">

function refresh() {
  ECSideUtil.reload('ec');
}
</script>

</body>
</html>